<template>
	
	<view class="content">
		<view class="body_head" click="backurl">
			<text class="icon-fanhui iconfont"></text> 借款额度
		</view>
		
		<view class="user_name">
			<text> {{name}} </text> 预计可借(元)			
		</view>
		<view class="money_box">
			
			<view class="money_num"> {{money}}</view>
			
			<view class="money_desc1"> 每月利息0.05%(年化利率 6%）</view>
			<view class="money_desc1"> 利息{{total}}</view>
			
		</view>
		
		<view class="money_bnt" @click="submits"> 去借钱 </view>
		
		<view class="money_tips"> 
		温馨提示:借款有风险，请根据自己情况合理选择，量入为出，理性借贷。借款资金仅用于个人消费，不得用于投资、归还其他贷款，严禁流入房市、股市，或者从事非法活动
		</view>
	</view>
	
</template>

<script>
	import {curl} from 'common/api.js';
	export default {
		data() {
			return {
				iamge:'',
				color1:'#fafafa',
				color2:'#ffffff',
				money:'',
				mobile:'',
				name:'',
				total:'',
				monthly:'',
				uid:''
			}
		},
		onShow() {
			
				
		},
		onLoad(ret) {
			this.name=ret.name;
			this.mobile=ret.mobile;
			this.money=ret.money;
			this.uid=ret.uid;
			var that=this;
			
			curl('daikuan/index',{money:ret.money}).then((res)=>{
					console.log('************');
					console.log(res);
				that.monthly=res.data.monthly;
				that.total=res.data.total;	
				
			});
			
		},
		methods: {
			backurl(){
				uni.navigateBack();
			},
			submits(){
				var mobile=this.mobile;
				var name=this.name;
				var money=this.money;
				var money=this.money;
				var uid=this.uid;
				
				uni.navigateTo({
					url:"/pages/jump/index?name="+name+"&mobile="+mobile+"&money="+money+"&uid="+uid
				})
				
				// curl('daikuan/submits',{'name':name,mobile:mobile,money:money}).then((res)=>{
				// 		console.log('************');
				// 		console.log(res);
					
				// });
				
				
			}
		}
	}
</script>

<style>
	
	.money_tips{
		width: 650rpx;
		height: auto;
		margin:100rpx auto;
		color: #555555;
		font-size: 26rpx;
		font-weight: 500;
	}
	.money_bnt{
		width: 450rpx;
		height: 90rpx;
		margin:65rpx auto;
		background: #00d229;
		color: #ffffff;border-radius: 10rpx;
		text-align: center;line-height: 90rpx;
		color: #ffffff;
	}

	.money_desc1{
		height: 50rpx;
		line-height: 50rpx;
		width: 400rpx;
		color: #fafafa;
		font-size: 24rpx;
		text-align: center;
		font-weight: 500;
	}
	.money_num{
		height: 200rpx;
		width: 400rpx;
		text-align: center;
		line-height: 300rpx;
		color: #ffffff;
		font-size: 48rpx;
		font-weight: bold;
	}
	
	.money_box{
		width: 400rpx;height:400rpx;
		border-radius: 400rpx;
		margin: 20rpx auto;
		background: linear-gradient(to bottom, #7ddb59 5%,#99e179 50%,#bbeaa3 75%,#fafafa 100%);
		
	}
	.user_name>text{
		margin-right: 20rpx;
	}
	.user_name{
		width: 700rpx;
		height:100rpx;line-height: 140rpx;
		margin:40rpx auto;
		text-align: center;
		color: #ffffff;
		font-size: 28rpx;font-weight: bold;
	}
	.body_head>text{
		color: #ffffff;font-weight: bold;
		font-size: 30rpx;
	}
	
	.body_head{
		width: 700rpx;
		height:90rpx;line-height: 90rpx;
		margin: auto;
		display: flex;
		align-items: center;
		font-size: 30rpx;
		color: #ffffff;
	}
	

</style>
